﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using Rocket.Core.Common;
using System.Linq.Expressions;

namespace Rocket.Core
{
    public interface IHandler<V>
        where V: BaseObject
    {
        RocketResponse Update(V entity);        
        List<V> GetAll();
        RocketResponse Remove(long id);
        RocketResponse Remove(V entity);
        RocketResponse RemoveAll();
        V GetView();
    }

    public interface IHandler<V, DTO> : IHandler<V>
        where V : BaseObject
        where DTO : class
    {
        List<V> GetAll(Expression<Func<DTO, bool>> whereCondition);
    }
}
